﻿@{
    ViewBag.Title = "Home Page";

    int refreshPeriod = ViewBag.RefreshPeriod; 
}

@*@section featured {
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h1>@ViewBag.Title.</h1>
                <h2>@ViewBag.Message</h2>
            </hgroup>
             <!-- Add content here -->
        </div>
    </section>
}*@

<style type="text/css">

    td.nowarp {
        white-space: nowrap;
    }

    .listening {
        color: blue;
    }

    .registered {
        color: green;
    }

    .unregistered {
        color: red;
    }

    .default {
        color: black;
    }
</style>


<script src="@Url.Content("~/Scripts/jquery-3.0.0.min.js")" type="text/javascript"></script>

<div id="messages">
    @Html.Partial("_EventPartial")
</div>

<script type="text/javascript">

    $.ajaxSetup ({
        // Disable caching of AJAX responses
        cache: false
    });

    $(function () {
        setInterval(function () { $('#events').load('/Home/RefreshEventPartial'); }, @refreshPeriod.ToString()); // every 3 sec
    });

</script>


